package com.qzsoft.zhjd.server.modules.laboratory.service.impl;

import com.qzsoft.zhjd.server.modules.laboratory.entity.CollectLaboratoryDevice1Entity;
import com.qzsoft.zhjd.server.modules.laboratory.mapper.CollectLaboratoryDevice1Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.qzsoft.zhjd.server.modules.laboratory.service.CollectLaboratoryDevice1Service;

/**
 * @ClassName LaboratoryDevice1ServiceImpl
 * @Description 试验设备业务接口实现
 * @author linhuawei
 * @since 2022-08-30
 */
@Service
public class CollectLaboratoryDevice1ServiceImpl implements CollectLaboratoryDevice1Service {

    @Autowired
    private CollectLaboratoryDevice1Mapper collectLaboratoryDevice1Mapper;

    @Override
    public CollectLaboratoryDevice1Entity getByCode(String code) {
        if (null != code) {
            QueryWrapper<CollectLaboratoryDevice1Entity> queryWrapper = new QueryWrapper<CollectLaboratoryDevice1Entity>();
            queryWrapper.eq("code", code);
            queryWrapper.last(" limit 0,1 ");
            return collectLaboratoryDevice1Mapper.selectOne(queryWrapper);
        }
        return null;
    }

}
